<%--
  Created by IntelliJ IDEA.
  User: ZhuChunXiao
  Date: 2017/5/19
  Time: 17:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<form id="form_personneluse_input" class="panel-body form-horizontal form-padding">
  <input type="hidden" name="keyId" id="keyId" value="${personnelUse.id}" />
  <input type="hidden" name="parentId" id="parentId" value="${personnelUse.personnelInfo.id}" />

  <div class="form-group">
    <label class="col-md-2 control-label">用人性质<i class="fa fa-asterisk txt-color-red"></i>
      <span id="natureSpan" style="display: none">${personneluse.nature}</span>
    </label>
    <div class="col-md-6">

      <div class="radio">
        <!-- Inline radio buttons -->
        <input disabled type="radio" name="nature" id="nature1Selected" class="magic-radio" value="1"
        <c:if test="${personnelUse.nature eq 1}"> checked="checked"</c:if> >
        <label for="nature1Selected">正式</label>

        <input disabled type="radio" name="nature" id="nature2Selected" class="magic-radio" value="2"
        <c:if test="${personnelUse.nature eq 2}"> checked="checked"</c:if> >
        <label for="nature2Selected">试用</label>

      </div>
    </div>
  </div>

  <div class="form-group">
    <label class="col-md-2 control-label">薪资<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-6">
      <input disabled type="number" id="salary" name="salary" class="form-control" placeholder="请输入薪资（元）" value="${personnelUse.salary}">
    </div>
  </div>

  <div class="form-group div-Hidden">
    <label class="col-md-2 control-label">合同开始日期<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-2">
      <div class="input-group date">
        <input disabled type="text" class="form-control" id="contractDateStart" name="contractDateStart" placeholder="请选择合同开始日期"
               value=<fmt:formatDate pattern="yyyy-MM-dd" value="${personnelUse.contractDateStart}" /> >
        <span class="input-group-addon"><i class="ti-calendar"></i></span>
      </div>
    </div>
    <label class="col-md-2 control-label">合同结束日期<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-2">
      <div class="input-group date">
        <input disabled type="text" class="form-control" id="contractDateEnd" name="contractDateEnd" placeholder="请选择合同结束日期"
               value=<fmt:formatDate pattern="yyyy-MM-dd" value="${personnelUse.contractDateEnd}" /> >
        <span class="input-group-addon"><i class="ti-calendar"></i></span>
      </div>
    </div>
  </div>

  <div class="form-group div-Hidden">
    <label class="col-md-2 control-label">试用开始日期<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-2">
      <div class="input-group date">
        <input disabled type="text" class="form-control" id="trialDateStart" name="trialDateStart" placeholder="请选择试用开始日期"
               value=<fmt:formatDate pattern="yyyy-MM-dd" value="${personnelUse.trialDateStart}" /> >
        <span class="input-group-addon"><i class="ti-calendar"></i></span>
      </div>
    </div>
    <label class="col-md-2 control-label">试用结束日期<i class="fa fa-asterisk txt-color-red"></i></label>
    <div class="col-md-2">
      <div class="input-group date">
        <input disabled type="text" class="form-control" id="trialDateEnd" name="trialDateEnd" placeholder="请选择试用结束日期"
               value=<fmt:formatDate pattern="yyyy-MM-dd" value="${personnelUse.trialDateEnd}" /> >
        <span class="input-group-addon"><i class="ti-calendar"></i></span>
      </div>
    </div>
  </div>


  <div class="form-group">
    <label class="col-md-2 control-label">提交人</label>
    <div class="col-md-2">
      <p class="form-control-static">${personnelUse.creater.name}</p>
    </div>
    <label class="col-md-2 control-label">提交日期</label>
    <div class="col-md-2">
      <p class="form-control-static"><fmt:formatDate pattern="yyyy-MM-dd" value="${personnelUse.createTime}" /></p>
    </div>
  </div>
</form>
<!--===================================================-->
<!-- END BASIC FORM ELEMENTS -->

<div class="panel-footer">
  <a class="btn btn-default" id="apply-re-common3" href="javascript:void(0)">
    <i class="fa fa-lg fa-mail-reply"></i> 返回视图
  </a>
  <c:if test="${personnelUse.numStatus==0 && user.id==personnelUse.creater.id}">
    <a class="btn btn-warning" key="ajax_personneluse_edit" href="javascript:void(0);"><i class="fa fa-lg fa-edit"></i> 编辑表单 </a>
  </c:if>
</div>

<script>

  //返回视图
  $("#apply-re-common3").click(returnToHashUrl);

  //编辑
  $("a[key='ajax_personneluse_edit']").unbind("click").bind("click",function(){
    __confirm_dialog("提示：","确定要编辑基本信息吗？",
            function () {
              // 加载编辑页面
              loadURL("<%=path%>/activiti/personneluse/edit/"+$("#form_personneluse_input #keyId").val()+"?parentId="+$("#form_personneluse_input #parentId").val(),$('#bsc-tab-3'));
            }
    )
  });

</script>